#pragma once

#include "MainFrame.h"
#include "Cursor.h"

class App
{
	DECLARE_SINGLETON(App);

public:
	tEvent1<eEditorMode> eventEditorModeChanged;

public:
	App();
    virtual ~App();

    virtual bool Init();
    virtual void Update();
    virtual void Shutdown();
    virtual bool Quit();

    void Run(HINSTANCE hInstance);

	HINSTANCE _hInstance() { return mInst; }
    HWND _hWnd() { return mWnd; }

	void Resize(int w, int h);

	void SetEditorMode(eEditorMode mode);
	eEditorMode GetEditorMode();

protected:
    HINSTANCE mInst;
    HWND mWnd;

	System * mSystem;
	GLRenderSystem * mRenderSystem;

	Cursor * mCursor;

	MGUI_Engine * mUIEngine;
	MainFrame * mMainFrame;

	eEditorMode mEditorMode;
};
